<template>
  <div>
    <router-link to="/home">Home</router-link> &nbsp;
    <router-link to="/login">Login</router-link>
    <hr>
    <transition name="fade" mode="out-in">
      <router-view></router-view>
    </transition>
  </div>
</template>

<script>
export default {
  name: 'App',
}
</script>

<style scoped>
  /* 过渡样式 */
  .fade-enter-active, .fade-leave-active {
    transition: opacity .5s;
  }
  /* 隐藏时的样式 */
  .fade-enter, .fade-leave-to {
    opacity: 0;
  }
</style>
